<template>
  <div class="hello">
    <h1>这是主页</h1>
    <el-button @click="goMenu" type="primary">跳去菜单</el-button>
  </div>
</template>

<script>
export default {
  data () {
    return {

    }
  },
  methods:{
    goMenu(){
      let user = {name:"wpp",age:21};
      // this.$router.push({"name":"menu",params:user})
      this.$router.push({"name":"menu",query:user})
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
